package com.bw.a1908.base;

import android.graphics.Color;
import android.os.Bundle;

import androidx.annotation.ColorInt;
import androidx.annotation.Nullable;

import com.blankj.utilcode.util.BarUtils;
import com.blankj.utilcode.util.ScreenUtils;
import com.bw.a1908.core.mvp.BaseActivity;
import com.bw.a1908.core.mvp.IPresenter;

/**
 * 状态栏相关支持
 * 1.全屏
 * 2.对呀颜色状态栏
 * 3.沉浸状态栏
 */
public abstract class StatusActivity<P extends IPresenter> extends BaseActivity<P> {

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        initBar();
        super.onCreate(savedInstanceState);
    }

    protected void fullScreen(){
        ScreenUtils.setFullScreen(this);
    }

    protected void statusBarColor(){
        statusBarColor(Color.WHITE);
    }

    protected void statusBarColor(@ColorInt int color){
        BarUtils.setStatusBarColor(this, color);
    }

    protected void statusTransBar(){
        BarUtils.transparentStatusBar(this);
    }

    protected abstract void initBar();
}
